/*
 * RpcService.h
 *
 *  Created on: Nov 20, 2015
 *      Author: rpi
 */

#ifndef RPCSERVICE_H_
#define RPCSERVICE_H_

#include "RpcServer.h"

template<typename T>
class GetRpcMethod
{
public:
	virtual typename Json::Rpc::RpcMethod<T>::Method getRpcMethod(std::string func) = 0;
private:
	GetRpcMethod() {};
	virtual ~GetRpcMethod() {};
};

template <typename T>
class RpcService
{
public:
	RpcService(std::string strIpAddr, unsigned short usPort);
	virtual ~RpcService();

	void initialize();
	void finalize();

private:
	RpcServer<T> _oRpcServer;
};

template<typename T>
RpcService<T>::RpcService(std::string strIpAddr, unsigned short usPort)
	: _oRpcServer(strIpAddr, usPort)
{
}

template<typename T>
inline void RpcService<T>::initialize()
{
}

template<typename T>
inline RpcService<T>::~RpcService()
{
}

template<typename T>
inline void RpcService<T>::finalize()
{
}

#endif /* RPCSERVICE_H_ */
